-- @owner: zou_jialiang050
-- @date: 2024/4/2
-- @testpoint: user作为函数名

--step1:建表;expect:成功drop schema if exists s_user_0007;create schema s_user_0007;drop table if exists s_user_0007.t_user_0007;create table s_user_0007.t_user_0007(cid int);--step2:user作为函数名;expect:成功drop function if exists s_user_0007.user;create function s_user_0007.user(card_id int) returns char(50) as$$declare num int := 0;beginwhile num<=card_id loopinsert into s_user_0007.t_user_0007 values(num);num := num+1;end loop;return card_id;end;$$ language plpgsql;/select s_user_0007.user(3);select * from s_user_0007.t_user_0007;--step3:清理环境;expect:成功drop function if exists s_user_0007.user;drop table if exists s_user_0007.t_user_0007;drop schema if exists s_user_0007;